<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" />
    <view class="text-area">
      <u-button type="primary" :text="title"></u-button>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref, reactive } from 'vue'
import { getList } from "@/api/home"
import { onLoad } from "@dcloudio/uni-app"
import { typeHome } from '@/types/home'

// uview-plus
const title = ref('uview-plus按钮')

// home页数据
const homeData = reactive<typeHome.homeData>(new typeHome.IhomeData())

// 获取列表数据
const getRecommendListFn = async () => {
  const data = await getList(homeData.paramsRecommend)
  console.log(data)
}

onLoad(() => {
  getRecommendListFn()
})
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
